feat: Add pipecat integration - #543
Merged
Merged
Conversation
Abhijeet Prasad (AbhiPrasad)
force-pushed
the
abhi-pipecat-integration
branch
5 times, most recently
from
July 7, 2026 23:09
0646781 to
2908880
Compare
Abhijeet Prasad (AbhiPrasad)
force-pushed
the
abhi-pipecat-integration
branch
2 times, most recently
from
August 4, 2026 20:26
e80c676 to
4e57906
Compare
Instrument Pipecat PipelineWorker instances through setup_pipecat() and auto_instrument(), emitting observer-based pipeline, model, tool, transcription, and speech spans. Cover the latest and minimum supported Pipecat versions with versioned VCR tests. Support independent user and agent audio attachments through the capture_user_audio_attachments, capture_agent_audio_attachments, and aggregate capture_audio_attachments options. Add matching generic BRAINTRUST_CAPTURE_USER_AUDIO_ATTACHMENTS and BRAINTRUST_CAPTURE_AGENT_AUDIO_ATTACHMENTS environment variables. Pipecat keeps attachments off by default; LiveKit preserves its existing agent-audio default while allowing the generic variable to disable it.
Abhijeet Prasad (AbhiPrasad)
force-pushed
the
abhi-pipecat-integration
branch
from
August 4, 2026 21:15
4e57906 to
53634e9
Compare
Abhijeet Prasad (AbhiPrasad)
marked this pull request as ready for review
August 4, 2026 21:43
Member
|
dam u doing the stacked prs thing |
Luca Forstner (lforst)
approved these changes
Aug 5, 2026
Abhijeet Prasad (AbhiPrasad)
added a commit
that referenced
this pull request
Aug 5, 2026
## Summary - disable LiveKit agent playback audio attachments by default - allow users to opt in with `BRAINTRUST_CAPTURE_AGENT_AUDIO_ATTACHMENTS=true` - preserve `agent_speaking` spans and synchronized transcripts when attachments are disabled - update the LiveKit setup documentation and regression coverage This PR is stacked on #543, which introduces the generic audio attachment environment controls. ## Validation - `nox -s "test_livekit_agents(latest)" -- -k "agent_audio_capture_respects_generic_env or agent_speaking_e2e"` - `nox -s "test_livekit_agents(1.3.1)" -- -k "agent_audio_capture_respects_generic_env"` - pre-commit checks on the changed files - pylint on the changed files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolves https://linear.app/braintrustdata/issue/SDK-7/braintrust-pipecat-integration
resolves #550
AI Summary
Adds observer-based Pipecat instrumentation through
setup_pipecat()andauto_instrument(). The integration injects aBraintrustPipecatObserverintoPipelineWorkerconstruction and turns pipeline, model, tool, transcription, and speech events into Braintrust spans.The integration supports Pipecat AI 1.3.0 and the pinned latest version, with versioned VCR coverage and subprocess coverage for auto-instrumentation.
Usage
Manual setup and audio options are also available:
The existing aggregate option remains supported:
Audio attachment controls
Audio attachments can be controlled across integrations with generic environment variables:
For Pipecat, precedence is:
capture_user_audio_attachments/capture_agent_audio_attachmentscapture_audio_attachmentsuser_speaking→input.audiotts_response→output.audioagent_speaking→output.audioSetting
BRAINTRUST_CAPTURE_AGENT_AUDIO_ATTACHMENTS=falsedisables LiveKit playback attachments while preservingagent_speakingspans and transcripts.Captured PCM chunks are accumulated and logged as WAV/PCM Braintrust attachments with sample-rate, channel-count, frame-count, and byte-size metadata when available.
Validation
Coverage includes:
Co-authored by StarfolkAI (@starfolkai)[bot]